package com.zushiye.order.service;

import com.zushiye.order.mapper.CartMapper;
import com.zushiye.order.model.CartItemBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CartService {

    @Autowired(required = false)
    private CartMapper mapper;

    public int insert(CartItemBean itemBean) {
        return mapper.insert(itemBean);
    }

    public int delete(String id) {
        return mapper.delete(id);
    }

    public int batchDelete(List<Integer> idList) {
        return mapper.batchDelete(idList);
    }

    public List<CartItemBean> queryAll(String user_id) {
        return mapper.queryAll(user_id);
    }






}
